1. Field of the Invention
The present general inventive concept relates to a data storage device and a method of operating the same, and more particularly, to a data storage device capable of using part of its normal capacity when the number of bad blocks exceeds a maximum, and a method of operating the same.
2. Description of the Related Art
As electronic industries develop data storage devices, the capacity of the storage devices is rapidly increasing. Nowadays, data storage devices are mounted in most electronic instruments, and portable data storage devices, which can easily store and carry high capacity data, are widely used.
Referring to FIG. 1, a conventional data storage device 10 includes a memory control unit 12 and a memory area 14. The memory control unit 12 drives firmware 22 recorded in the memory area 14 to write or delete data in a user space 24. In FIG. 1, the firmware 22 is recorded in the memory area 14, but the firmware 22 may be recorded in the memory control unit 12.
The memory area 14 includes memory blocks (not shown). When a memory block is defective, it is described as a bad block. Bad blocks may be formed or found during fabrication or later during operation of the data storage device 10.
The maximum number of acceptable bad blocks is determined for a data storage device such as a flash memory. If the firmware 22 detects more bad blocks than the maximum, the whole data storage device is treated as defective. If this occurs during production, the data storage device 10 is discarded. If the bad blocks exceed the maximum during use, the data storage device 10 needs to be operated for read only or operates abnormally.